<?php include "headers/public.phtml"; ?>
</head>

<body>
<div class="wrapper">
	<div class="header">
		<div class="logo">
			<h1><a href="<?php echo $sn; ?>"><img src="<?php echo $sn; ?>/images/logo.png" alt="I Pledge To Egypt.org - Support the rebuild of Egypt"></a></h1>
			<h2>Support Egypt's Rebuild</h2>
		</div>
		<div class="stats">
		</div>
	</div>
	
	<div class="red_container">
		<div class="content_wide2">
		<div class="big">
			<b><?php echo $this->pledges_counter; ?></b> pledges from <b><?php echo $this->pledge_countries; ?></b> countries<br>covering <b><?php echo $this->pledge_fields; ?></b> different areas of expertise.
		</div>
		<br><br>
		<div class="join ui-corner-all">Help us spread the word<br><a href="<?php echo $sn; ?>/join">Join This Effort</a></div></div>
	</div>	
	
	
	
	<div class="pledges">		
		<div class="left">
		<?php 	
				$tools = new Pledges();
				if ($this->pledges_1) 
				{ 					
					foreach ($this->pledges_1 as $p) 
					{
		?>
							<div class="pledge ui-corner-all">
								<div class="title">
									<div class="flag"><img src="<?php echo $sn; ?>/images/flags/<?php echo $p->country; ?>.png" alt="<?php echo $p->country; ?>" width="32px" height="32px"></div>
									<div class="content">
										<?php if ($p->field) { echo "<b>" . $p->field . " Expertise</b><br>"; } ?>
										"<?php if (strlen($p->pledge) > 350) { echo substr($p->pledge,0,350) . "..."; } else { echo $p->pledge; } ?>"										
									</div>
								</div>
								<div class="pledger">
									<?php if ($p->anonymous) { echo "Anonymous"; } else { echo $p->full_name; } ?><?php echo " - " . $tools->getRelativeTime($p->created); ?><br>
									<a href="<?php echo $sn; ?>/pledges/<?php echo $p->pledge_id; ?>">More &raquo;</a>
								</div>
							</div>
							<div class="spacer"></div>
		<?php 
					}
				} 
		?>
		</div>
		<div class="right">
		<?php 	if ($this->pledges_2) 
				{ 					
					foreach ($this->pledges_2 as $p) 
					{
		?>
							<div class="pledge ui-corner-all">
								<div class="title">
									<div class="flag"><img src="<?php echo $sn; ?>/images/flags/<?php echo $p->country; ?>.png" alt="<?php echo $p->country; ?>" width="32px" height="32px"></div>
									<div class="content">
										<?php if ($p->field) { echo "<b>" . $p->field . " Expertise</b><br>"; } ?>
										"<?php if (strlen($p->pledge) > 350) { echo substr($p->pledge,0,350) . "..."; } else { echo $p->pledge; } ?>"										
									</div>
								</div>
								<div class="pledger">
									<?php if ($p->anonymous) { echo "Anonymous"; } else { echo $p->full_name; } ?><?php echo " - " . $tools->getRelativeTime($p->created); ?><br>
									<a href="<?php echo $sn; ?>/pledges/<?php echo $p->pledge_id; ?>">More &raquo;</a>
								</div>
							</div>
							<div class="spacer"></div>
		<?php 
					}
				} 
		?>
		</div>		
	</div>
	
	<div class="spacer"></div>
	

</div>

<?php include "footers/public.phtml"; ?>